<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <!--头部固定引用-->
    <meta charset="utf-8">
    <meta name="full-screen" content="yes">
    <meta name="x5-fullscreen" content="true">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no">
    <link rel="stylesheet" href="../../css/base.css">
    <link rel="stylesheet" href="../../css/icon-font.css"/><!--图标-->
    <!--固定引用结束,自定义引用添加在下面-->
    <title>反馈消息</title>
    <!--页面样式添加在这里，多看看base。css里面的公共样式，大部分常用的都有，避免使用独立css文件为单独页面设置样式，避免随意添加样式到公共样式-->
    <style>

        .feedback-schedule-body {
            padding: 0.28rem 0.32rem 0 0.32rem;
            background-color: white;
            border-bottom: 0.02rem solid #f6f6f6
        }

        .feedback-schedule-type {
            font-size: 0.3rem;
            color: rgba(34, 34, 34, 1);
        }

        .feedback-schedule-img {
            margin: 0.24rem 0.2rem 0.36rem 0;
        }

        .feedback-schedule-msgConnect {
            font-size: 0.28rem;
            color: rgba(34, 34, 34, 0.7);
            margin-top: 0.04rem;
        }

        .feedback-schedule-date {
            font-size: 0.24rem;
            color: rgba(34, 34, 34, 0.5);
        }

        .feedback-schedule-goDetail {
            margin-right: 0.2rem;
            color: rgba(44, 104, 255, 1);
        }

        /*右侧图标*/
        .edit-personal-right {
            color: #999999
        }

        .feedback-schedule-noMsg img {
            margin-top: 2.62rem;
            width: 5.18rem;
            height: 2.16rem;
        }

        .feedback-schedule-noMsgText {
            margin-top: 0.14rem;
            color: rgba(34, 34, 34, 0.7);
            line-height: 0.34rem;
        }
    </style>
</head>
<!--尽量不要在body上添加样式，除了背景色-->
<body>
<div class="w-100-p h-100-p flex-column">
    <!-- 导航栏&标题栏 -->
    <div class="placeholder-top">
        <!--状态栏-->
        <div class="bg-main status-bar pos-f"></div>
        <!--导航栏-->
        <div class="bg-main nav-bar pos-f flex-row justify-content-between c-white align-items-center">
            <div class="left-bar" onclick="clickBack()">
                <span class="iconfont iconfanhui1 fs16"></span>
            </div>
            <div class="center-bar fs16 ff500 line1">反馈消息</div>
            <div class="right-bar">
            </div>
        </div>
    </div>

    <!--反馈消息体-->
    <div class="flex-1 flex-column scoll-y " id="feedback-body">

    </div>

</div>
</body>
<!--下面四个文件为固定引用，自己根据情况调整路径，不要跟换引入顺序，其他引用添加在后面-->
<script src="../../js/dict.js"></script>
<script src="../../js/jquery-3.4.1.min.js"></script>
<script src="../../js/checkJsBridge.js"></script>
<script src="../../js/utils.js"></script>
<!--固定引用结束-->
<script src="../../js/api.js"></script>
<script src="../../js/date.js"></script>
<!--避免一个页面包含过多功能，减少js重绘页面，推荐分功能，分页面-->
<script>
    function initQuestion() {
      Server.feedback.getFeedbackList( {
        pageNum: 1,
        pageSize: 20
      }).then(function (data) {
        if (data.list.length === 0){
          let  htmlNoData
          htmlNoData = `
                    <div class="feedback-schedule-noMsg flex-row justify-content-center">
                    <img src="../../images/user/messageInfo-noMsg.png">
                    </div>
                    <div class="feedback-schedule-noMsgText flex-row justify-content-center fs12 ff400">暂无相关内容</div>
                  `
          $('#feedback-body').html(htmlNoData)
          return
        }
        let htmlStr = ''
        data.list.forEach(item => {

          htmlStr += `<div class="bg-white mt8 ">
                            <div class="flex-column feedback-schedule-body ">
                                <div class="feedback-schedule-type">${item.messageType === '1' ? '意见反馈' : (item.messageType === '2' ? '意见与建议' : '其他')}</div>
                                <div class="feedback-schedule-msgConnect line2">${item.msgConnect}</div>
                                <div class="flex-row feedback-schedule-img">

                                </div>
                            </div>
                            <div class="flex-row justify-content-between" style="padding: 0.22rem 0.32rem 0.24rem 0.32rem;">
                                <div class="feedback-schedule-date ff400">${DateUtils.int2Str(item.createdTime * 1000, 'yyyy-MM-dd hh:mm')}</div>
                                <div onclick="goFeedBackDetail('${item.messageId}','${item.status}')">
                                    <span class="feedback-schedule-goDetail">查看进度</span><span
                                        class="iconfont iconfanhui fs11 edit-personal-right"></span>
                                </div>
                            </div>
                        </div>`

        })
        // 意见反馈图片格式  ---- 预留
        // <div style="height:1.2rem;width:1.2rem;margin-right: 0.2rem">
        // <img class="w-100-p h-100-p" src="../../images/home/home-detail-jrgs.png"/>
        // </div>
        //
        // <div style="height:1.2rem;width:1.2rem;margin-right: 0.2rem">
        // <img class="w-100-p h-100-p" src="../../images/home/home-detail-jrgs.png"/>
        // </div>
        $('#feedback-body').html(htmlStr)
      })

    }

    function goFeedBackDetail(messageId,status){
      jsBridge.openWindow('html/user/feedback-detail.html',{messageId:messageId,status:status},{noBar:false})
}

    /*固定页面初始化方法，用于替代$(function(){}),param为url参数，Object类型*/
    function initPage(params) {
      //状态栏自适应
      Utils.sbhAdaptive()
      //初始化页面
      initQuestion()

}

    /*页面所在窗口由后台前台时触发的方法,param为url参数，Object类型*/
    function startPage(params) {

    }
</script>
</html>
